package com.alit.ip.controller;

import java.util.Map;

import com.alit.ip.utils.RequestUtil;
import com.jfinal.core.Controller;
import com.jfinal.kit.JsonKit;

public class IPController extends Controller {
  public void index() {
    String ip = RequestUtil.getIp(getRequest());
    Map<String, String> map = RequestUtil.getRequestIp(getRequest());
    map.put("ip", ip);
    String json = JsonKit.toJson(map);
    json += "\r\n";
    renderText(json);
  }
}